package cn.wanho.service;

import cn.wanho.rvo.ResultVO;
import com.fasterxml.jackson.core.JsonProcessingException;

public interface ExamService {
    /**
     * 检测当前学生是否存在考试
     * @return
     */
    ResultVO testCheck(Integer userId) throws JsonProcessingException;

    /**
     * 开始考试，展示试卷
     */
    ResultVO testing(Integer paperId,Integer id);

    /**
     * 保存当前答题（redis存储）
     * @param questionId
     * @param answerContent
     * @param paperId
     * @param id
     * @return
     */
    //ResultVO saveExam(String questionId, String answerContent, String paperId, Integer id);
    ResultVO saveExam2(String questionId, String answerContent, String paperId, Integer id) throws IllegalAccessException;


    /**
     * 考试结束提交试卷
     * @param paperId
     * @param userId
     * @return
     */
    ResultVO commit( Integer userId,String paperId);

    /**
     * 展示题目
     */
    ResultVO showPaper(Integer paperId,Integer sort,Integer studentId) throws NoSuchFieldException, IllegalAccessException;



}
